home *** CD-ROM | disk | FTP | other *** search
/ ftp.mactech.com 2010 / ftp.mactech.com.tar / ftp.mactech.com / machack / Hacks96 / BootingGallery.sit / Booting Gallery / Booting Gallery (source) / Sources / Duck Game Sources / GunSprite.h < prev    next >
Text File  |  1996-06-22  |  928b  |  60 lines

  1. #ifndef __GunSprite_H__
  2. #define __GunSprite_H__
  3.  
  4. /***
  5.  *     Created by Bill Hubauer on Fri, Jun 21, 1996 @ 2:53 AM.
  6.  *
  7.  ***/
  8.  
  9. #ifndef __SpriteGame_H__
  10. #include "SpriteGame.h"
  11. #endif
  12.  
  13.  
  14. class CGunSprite : public CGameSprite
  15. {
  16. public:
  17.     CGunSprite(CSpriteWorld* world,CSpriteGame* game);
  18.     virtual ~CGunSprite();
  19.     
  20.     
  21.     enum { kBaseImageID = 1000 , kMoveInterval = 20};
  22.     enum { kGunSoundID = 1000 };
  23.     
  24.     virtual    void    UpdatePosition() ; //Override
  25.     
  26. protected:
  27.             
  28.             
  29.             
  30.             Boolean    LeftArrowQ();
  31.             Boolean    RightArrowQ();
  32.             Boolean    SpaceDownQ();
  33.             
  34.             void    FireGun();
  35.  
  36.     
  37.     
  38.  
  39. };
  40.  
  41. class CBulletSprite : public CGameSprite
  42. {
  43. public:
  44.     CBulletSprite(CSpriteWorld* world,CSpriteGame* game,short startTop,short startLeft,
  45.         short deltaV,short deltaH);
  46.     virtual ~CBulletSprite();
  47.     
  48.     virtual    void    UpdatePosition();
  49.     virtual void    WasHitBy(CSprite* s);
  50.     
  51. protected:
  52.     enum { kBulletImageID = 2000 };
  53.  
  54.     short    fDeltaH;
  55.     short    fDeltaV;
  56. };
  57.  
  58.  
  59. #endif
  60.